/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.targeter.rulesengine.model;

import com.liferay.portal.model.ModelWrapper;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * This class is a wrapper for {@link models}.
 * </p>
 *
 * @author    jsalaice
 * @see       models
 * @generated
 */
public class modelsWrapper implements models, ModelWrapper<models> {
	public modelsWrapper(models models) {
		_models = models;
	}

	public Class<?> getModelClass() {
		return models.class;
	}

	public String getModelClassName() {
		return models.class.getName();
	}

	public Map<String, Object> getModelAttributes() {
		Map<String, Object> attributes = new HashMap<String, Object>();

		attributes.put("_id", get_id());
		attributes.put("model", getModel());
		attributes.put("active", getActive());

		return attributes;
	}

	public void setModelAttributes(Map<String, Object> attributes) {
		Long _id = (Long)attributes.get("_id");

		if (_id != null) {
			set_id(_id);
		}

		String model = (String)attributes.get("model");

		if (model != null) {
			setModel(model);
		}

		Boolean active = (Boolean)attributes.get("active");

		if (active != null) {
			setActive(active);
		}
	}

	/**
	* Returns the primary key of this models.
	*
	* @return the primary key of this models
	*/
	public long getPrimaryKey() {
		return _models.getPrimaryKey();
	}

	/**
	* Sets the primary key of this models.
	*
	* @param primaryKey the primary key of this models
	*/
	public void setPrimaryKey(long primaryKey) {
		_models.setPrimaryKey(primaryKey);
	}

	/**
	* Returns the _id of this models.
	*
	* @return the _id of this models
	*/
	public long get_id() {
		return _models.get_id();
	}

	/**
	* Sets the _id of this models.
	*
	* @param _id the _id of this models
	*/
	public void set_id(long _id) {
		_models.set_id(_id);
	}

	/**
	* Returns the model of this models.
	*
	* @return the model of this models
	*/
	public java.lang.String getModel() {
		return _models.getModel();
	}

	/**
	* Sets the model of this models.
	*
	* @param model the model of this models
	*/
	public void setModel(java.lang.String model) {
		_models.setModel(model);
	}

	/**
	* Returns the active of this models.
	*
	* @return the active of this models
	*/
	public boolean getActive() {
		return _models.getActive();
	}

	/**
	* Returns <code>true</code> if this models is active.
	*
	* @return <code>true</code> if this models is active; <code>false</code> otherwise
	*/
	public boolean isActive() {
		return _models.isActive();
	}

	/**
	* Sets whether this models is active.
	*
	* @param active the active of this models
	*/
	public void setActive(boolean active) {
		_models.setActive(active);
	}

	public boolean isNew() {
		return _models.isNew();
	}

	public void setNew(boolean n) {
		_models.setNew(n);
	}

	public boolean isCachedModel() {
		return _models.isCachedModel();
	}

	public void setCachedModel(boolean cachedModel) {
		_models.setCachedModel(cachedModel);
	}

	public boolean isEscapedModel() {
		return _models.isEscapedModel();
	}

	public java.io.Serializable getPrimaryKeyObj() {
		return _models.getPrimaryKeyObj();
	}

	public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
		_models.setPrimaryKeyObj(primaryKeyObj);
	}

	public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
		return _models.getExpandoBridge();
	}

	public void setExpandoBridgeAttributes(
		com.liferay.portal.service.ServiceContext serviceContext) {
		_models.setExpandoBridgeAttributes(serviceContext);
	}

	@Override
	public java.lang.Object clone() {
		return new modelsWrapper((models)_models.clone());
	}

	public int compareTo(com.targeter.rulesengine.model.models models) {
		return _models.compareTo(models);
	}

	@Override
	public int hashCode() {
		return _models.hashCode();
	}

	public com.liferay.portal.model.CacheModel<com.targeter.rulesengine.model.models> toCacheModel() {
		return _models.toCacheModel();
	}

	public com.targeter.rulesengine.model.models toEscapedModel() {
		return new modelsWrapper(_models.toEscapedModel());
	}

	@Override
	public java.lang.String toString() {
		return _models.toString();
	}

	public java.lang.String toXmlString() {
		return _models.toXmlString();
	}

	public void persist()
		throws com.liferay.portal.kernel.exception.SystemException {
		_models.persist();
	}

	/**
	 * @deprecated Renamed to {@link #getWrappedModel}
	 */
	public models getWrappedmodels() {
		return _models;
	}

	public models getWrappedModel() {
		return _models;
	}

	public void resetOriginalValues() {
		_models.resetOriginalValues();
	}

	private models _models;
}